﻿using System.Drawing;
using Com.OpenCode.Framework.Core;

namespace Com.OpenCode.Framework.DevForm
{
    public static class DevFormImage
    {
        public static void Init()
        {
            Plugin plugin = DevFormActivator.Addin.Plugin.Search("Icon", "Id", "Ribbon32");
            if (plugin != null)
            {
                Ribbon32 = (Image) DevFormActivator.Addin.Bulid(plugin, null);
            }
            plugin = DevFormActivator.Addin.Plugin.Search("Icon", "Id", "Ribbon16");
            if (plugin != null)
            {
                Ribbon16 = (Image) DevFormActivator.Addin.Bulid(plugin, null);
            }
            plugin = DevFormActivator.Addin.Plugin.Search("Icon", "Id", "RightMenu16");
            if (plugin != null)
            {
                RightMenu16 = (Image) DevFormActivator.Addin.Bulid(plugin, null);
            }
            plugin = DevFormActivator.Addin.Plugin.Search("Icon", "Id", "TreeNode16");
            if (plugin != null)
            {
                TreeNode16 = (Image)DevFormActivator.Addin.Bulid(plugin, null);
            }
        }

        public static Image Ribbon32 { get; private set; }
        public static Image Ribbon16 { get; private set; }
        public static Image RightMenu16 { get; private set; }
        public static Image TreeNode16 { get; private set; }
    }
}
